Recently, various types of devices comprising a magnetic layer have been developed. One of the devices is a magnetic memory. For example, a spin-transfer-torque (STT) magnetic random access memory (MRAM) stores data in a magnetic layer.
These devices have a common problem. When a magnetic layer is patterned, redeposition of a magnetic material is collaterally caused. The redeposition degrades the characteristics of the devices.